﻿using System;
using System.Collections.Generic;
using System.Linq;
using ExpenseSystem.Common;
using ExpenseSystem.Fether;
using ExpenseSystem.Model;
using ExpenseSystem.Lor;

namespace ExpenseSystem.Fether
{
    public class BankFetcher : NormalFetcher<BankModel>
    {
        public BankModel GetByCode(long site, string code, out string message)
        {
            IList<BankModel> result = List(site, OrderBy.GetDefault(), Limit.GetDefault(), out message, out rows, Restrain.Eq("Code", code));
            if (result.Count > 0)
                return result.First();
            return null;
        }
    }
}
